home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0696 / setup.arv / RTFLIB.HDF < prev    next >
Encoding:
Text File  |  1997-04-08  |  17.4 KB  |  372 lines

  1. ;******************************************************************************
  2. ; Ver 13.0, Last Update Mar 15, 1995                                          *
  3. ;                                   rtfLIB                                    *
  4. ;                                                                             *
  5. ; This library adds functionality to HLPDK 11.0+, and adds special functions  *
  6. ; to RTF based targets : winHelp, MMViewer, RTF Word Processor target.        *
  7. ;                                                                             *
  8. ; The following added functionality is added :                                *
  9. ;                                                                             *
  10. ; Text Attributes for internal pieces of text. (bold, undeline, italic)       *
  11. ; Special Links : Graphics and Normal Non-Hilighted links.                    *
  12. ; Complete WINHELP Macro API support for WINHELP and MM Viewer targets.       *
  13. ; INCLUDING The *UNDOCUMENTED* winhelp macros!                                *
  14. ; Multimedia - MCI string interface, Video, CDAudio, and generic FUN!         *
  15. ;                                                                             *
  16. ;******************************************************************************
  17.  
  18. .ifdef rtfbased
  19.  
  20. ;******************************************************************************
  21. ;                               Text Attributes                               *
  22. ;                                                                             *
  23. ; boldText - Display text in bold, e.g. - ~Text~boldText~ - Text will be in   *
  24. ;                                         bold                                *
  25. ; italicText - Display text in italic                                         *
  26. ; underlineText - displayText in underline                                    *
  27. ; boldItalicText - display text in bold italic                                *
  28. ;                                                                             *
  29. ; fontText(fontNum) - Display Text in font# from font pallete                 *
  30. ;  e.g.   ~This is in font 3~fontText(3)~                                     *
  31. ;******************************************************************************
  32.  
  33. .userlink boldText '{\b %t}'
  34. .userlink italicText '{\i %t}'
  35. .userlink underlineText '{\ul %t}'
  36. .userlink boldItalicText '{\b\i %t}'
  37.  
  38. .userlink fontText '{\f%1 %t}'
  39.  
  40. .user lineBreak '\line '
  41.  
  42. .ifndef document
  43.  
  44. ;******************************************************************************
  45. ;                                   Topics                                    *
  46. ;                                                                             *
  47. ; dropContext - set a context point in a long topic. e.g. ~ct1~dropContext~   *
  48. ;                                                                             *
  49. ; You can later jump to this context with a !JumpID macro ..                  *
  50. ;                                                                             *
  51. ; The }{ before the string are to resolve a WinHelp compiler bug - otherwise  *
  52. ; the token is not recognized when in the middle of a paragraph.              *
  53. ;******************************************************************************
  54.  
  55. .userlink dropContext '{#{\footnote # %T}}'
  56.  
  57. ;******************************************************************************
  58. ;                                    Links                                    *
  59. ;                                                                             *
  60. ; The following set of userlink templates support special link capabilities : *
  61. ;                                                                             *
  62. ; NormalTextLink(linkTarget) - Display the link text in normal color, and NOT *
  63. ;                              with the underline green format                *
  64. ; NormalTextPopup(linkTarget) - Same as above - but for popups.               *
  65. ;                                                                             *
  66. ; GraphicLink(graphicObject LinkTarget) - Display a graphic, that conects to  *
  67. ;                                         a linkTarget, the graphic object    *
  68. ;                                         should have been decalred in a      *
  69. ;                                         .GRAPHIC statement.                 *
  70. ; graphicPopup(graphicObject linkTarget) - Same as above, coonnect to a popup *
  71. ;******************************************************************************
  72.  
  73. .userlink NormalTextLink '{\uldb %t}{\v %%%1}'
  74. .userlink NormalTextPopup '{\ul %t}{\v %%%1}'
  75.  
  76. .userlink graphicLink '{\uldb \{bmc %G1\}}{\v %2}'
  77. .userlink graphicPopup '{\ul \{bmc %G1\}}{\v %2}'
  78.  
  79. .else
  80.  
  81. .userlink NormalTextLink '%t'
  82. .userlink NormalTextPopup '%t'
  83.  
  84. .userlink graphicLink '%t'
  85. .userlink graphicPopup '%t'
  86.  
  87. .endif
  88.  
  89. ;******************************************************************************
  90. ;                                   Macros                                    *
  91. ;                                                                             *
  92. ; The complete windows macro facility is supported here, with a set of        *
  93. ; !XXX macros defined as user links for general use in links, and             *
  94. ; $XXX macros as substitution macros only. (Not for topictext links)          *
  95. ;******************************************************************************
  96.  
  97. .ifndef document
  98.  
  99. .userlink !about '{\uldb %t}{\v !About()}'
  100. .userlink $about 'About()'
  101.  
  102. .userlink $addAccelarator 'AddAccelerator(%1,%2,"%3")'
  103. .userlink !addAccelarator '{\uldb %t}{\v !AddAccelerator(%1,%2,"%3")}'
  104.  
  105. .userlink $annotate 'Annotate()'
  106. .userlink !annotate '{\uldb %t}{\v !Annotate()}'
  107.  
  108. .userlink $appendItem 'AppendItem("%1","%2","%3","%4")'
  109. .userlink !appendItem '{\uldb %t}{\v !AppendItem("%1","%2","%3","%4")}'
  110.  
  111. .userlink $back 'Back()'
  112. .userlink !back '{\uldb %t}{\v !Back()}'
  113.  
  114. .userlink $bookmarkDefine 'BookmarkDefine()'
  115. .userlink !bookmarkDefine '{\uldb %t}{\v !BookmarkDefine()}'
  116.  
  117. .userlink $bookmarkMore 'BookmarkMore()'
  118. .userlink !bookmarkMore '{\uldb %t}{\v !BookmarkMore()}'
  119.  
  120. .userlink $browseButtons 'BrowseButtons()'
  121. .userlink !browseButtons '{\uldb %t}{\v !BrowseButtons()}'
  122.  
  123. .userlink $changeButtonBinding 'ChangeButtonBinding("%1","%2")'
  124. .userlink !changeButtonBinding '{\uldb %t}{\v !ChangeButtonBinding("%1","%2")}'
  125.  
  126. .userlink $changeItemBinding 'ChangeItemBinding("1","2")'
  127. .userlink !changeItemBinding '{\uldb %t}{\v !ChangeItemBinding("1","2")}'
  128.  
  129. .userlink $checkItem 'CheckItem("%1")'
  130. .userlink !checkItem '{\uldb %t}{\v !CheckItem("%1")}'
  131.  
  132. .userlink $closeWindow 'CloseWindow("%1")'
  133. .userlink !closeWindow '{\uldb %t}{\v !CloseWindow("%1")}'
  134.  
  135. .userlink $contents 'Contents()'
  136. .userlink !contents '{\uldb %t}{\v !Contents()}'
  137.  
  138. .userlink $copyDialog 'CopyDialog()'
  139. .userlink !copyDialog '{\uldb %t}{\v !CopyDialog()}'
  140.  
  141. .userlink $copyTopic 'CopyTopic()'
  142. .userlink !copyTopic '{\uldb %t}{\v !CopyTopic()}'
  143.  
  144. .userlink $createButton 'CreateButton("%1","%2","%3")'
  145. .userlink !createButton '{\uldb %t}{\v !CreateButton("%1","%2","%3")}'
  146.  
  147. .userlink $deleteItem 'DeleteItem("%1")'
  148. .userlink !deleteItem '{\uldb %t}{\v !DeleteItem("%1")}'
  149.  
  150. .userlink $deleteMark 'DeleteMark("%1")'
  151. .userlink !deleteMark '{\uldb %t}{\v !DeleteMark("%1")}'
  152.  
  153. .userlink $destroyButton 'DestroyButton("%1")'
  154. .userlink !destroyButton '{\uldb %t}{\v !DestroyButton("%1")}'
  155.  
  156. .userlink $disableButton 'DisableButton("%1")'
  157. .userlink !disableButton '{\uldb %t}{\v !DisableButton("%1")}'
  158.  
  159. .userlink $disableItem 'DisableItem("%1")'
  160. .userlink !disableItem '{\uldb %t}{\v !DisableItem("%1")}'
  161.  
  162. .userlink $enableItem 'EnableItem("%1")'
  163. .userlink !enableItem '{\uldb %t}{\v !EnableItem("%1")}'
  164.  
  165. .userlink $enableButton 'EnableButton("%1")'
  166. .userlink !enableButton '{\uldb %t}{\v !EnableButton("%1")}'
  167.  
  168. .userlink $execProgram 'ExecProgram("%1", %2)'
  169. .userlink !execProgram '{\uldb %t}{\v !ExecProgram("%1",%2)}'
  170.  
  171. .userlink $exit 'Exit()'
  172. .userlink !exit '{\uldb %t}{\v !Exit()}'
  173.  
  174. .userlink $fileOpen 'FileOpen()'
  175. .userlink !fileOpen '{\uldb %t}{\v !FileOpen()}'
  176.  
  177. .userlink $focusWindow 'FocusWindow("%1")'
  178. .userlink !focusWindow '{\uldb %t}{\v !FocusWindow("%1")}'
  179.  
  180. .userlink $gotoMark 'GoToMark("%1")'
  181. .userlink !gotoMark '{\uldb %t}{\v !GoToMark("%1")}'
  182.  
  183. .userlink $helpOn 'HelpOn()'
  184. .userlink !helpOn '{\uldb %t}{\v !HelpOn()}'
  185.  
  186. .userlink $helpOnTop 'HelpOnTop()'
  187. .userlink !helpOnTop '{\uldb %t}{\v !HelpOnTop()}'
  188.  
  189. .userlink $history 'History()'
  190. .userlink !history '{\uldb %t}{\v !History()}'
  191.  
  192. .userlink $ifThen 'IfThen(IsMark("%1"),"%2")'
  193. .userlink !ifThen '{\uldb %t}{\v !IfThen(IsMark("%1"),"%2")}'
  194.  
  195. .userlink $ifThenElse 'IfThenElse(IsMark("%1"),"%2","%3")'
  196. .userlink !ifThenElse '{\uldb %t}{\v !IfThenElse(IsMark("%1"),"%2","%3")}'
  197.  
  198. .userlink $insertItem 'InsertItem("%1","%2","%3","%4",%5)'
  199. .userlink !insertItem '{\uldb %t}{\v !InsertItem("%1","%2","%3","%4",%5)}'
  200.  
  201. .userlink $insertMenu 'InsertMenu("%1","%2",%3)'
  202. .userlink !insertMenu '{\uldb %t}{\v !InsertMenu("%1","%2",%3)}'
  203.  
  204. .userlink $isMark 'IsMark("%1")'
  205. .userlink !isMark '{\uldb %t}{\v !IsMark("%1")}'
  206.  
  207. .userlink $jumpContents 'JumpContents("%1")'
  208. .userlink !jumpContents '{\uldb %t}{\v !JumpContents("%1")}'
  209.  
  210. .userlink $jumpContext 'JumpContext("%1",%2)'
  211. .userlink !jumpContext '{\uldb %t}{\v !JumpContext("%1",%2)}'
  212.  
  213. .userlink $jumpHelpOn 'JumpHelpOn()'
  214. .userlink !jumpHelpOn '{\uldb %t}{\v !JumpHelpOn()}'
  215.  
  216. .userlink $jumpId 'JumpId("%1","%2")'
  217. .userlink !jumpId '{\uldb %t}{\v !JumpId("%1","%2")}'
  218.  
  219. .userlink $jumpKeyword 'JumpKeyWord("%1","%2")'
  220. .userlink !jumpKeyword '{\uldb %t}{\v !JumpKeyWord("%1","%2")}'
  221.  
  222. .userlink $next 'Next()'
  223. .userlink !next '{\uldb %t}{\v !Next()}'
  224.  
  225. .userlink $not 'Not(!IsMark("%1"))'
  226. .userlink !not '{\uldb %t}{\v !Not(!IsMark("%1"))}'
  227.  
  228. .userlink $popupContext 'PopupContext("%1",%2)'
  229. .userlink !popupContext '{\uldb %t}{\v !PopupContext("%1",%2)}'
  230.  
  231. .userlink $popupId 'PopupId("%1","%2")'
  232. .userlink !popupId '{\uldb %t}{\v !PopupId("%1","%2")}'
  233.  
  234. .userlink $positionWindow 'PositionWindow(%1,%2,%3,%4,%5,"%6")'
  235. .userlink !positionWindow '{\uldb %t}{\v !PositionWindow(%1,%2,%3,%4,%5,"%6")}'
  236.  
  237. .userlink $prev 'Prev()'
  238. .userlink !prev '{\uldb %t}{\v !Prev()}'
  239.  
  240. .userlink $print 'Print()'
  241. .userlink !print '{\uldb %t}{\v !Print()}'
  242.  
  243. .userlink $printerSetup 'PrinterSetup()'
  244. .userlink !printerSetup '{\uldb %t}{\v !PrinterSetup()}'
  245.  
  246. .userlink $registerRoutine 'RegisterRoutine("%1","%2","%3")'
  247. .userlink !registerRoutine '{\uldb %t}{\v !RegisterRoutine("%1","%2","%3")}'
  248.  
  249. .userlink $removeAccelerator 'RemoveAccelerator(%1,%2)'
  250. .userlink !removeAccelerator '{\uldb %t}{\v !RemoveAccelerator(%1,%2)}'
  251.  
  252. .userlink $saveMark 'SaveMark("%1")'
  253. .userlink !saveMark '{\uldb %t}{\v !SaveMark("%1")}'
  254.  
  255. .userlink $search 'Search()'
  256. .userlink !search '{\uldb %t}{\v !Search()}'
  257.  
  258. .userlink $setContents 'SetContents("%1",%2)'
  259. .userlink !setContents '{\uldb %t}{\v !SetContents("%1",%2)}'
  260.  
  261. .userlink $setHelpOnFile 'SetHelpOnFile("%1")'
  262. .userlink !setHelpOnFile '{\uldb %t}{\v !SetHelpOnFile("%1")}'
  263.  
  264. .userlink $uncheckItem 'UncheckItem("%1")'
  265. .userlink !uncheckItem '{\uldb %t}{\v !UncheckItem("%1")}'
  266.  
  267. ;******************************************************************************
  268. ;                                UNDOCUMENTED                                 *
  269. ;                                                                             *
  270. ; Support for the undocumented functions is provided according to the         *
  271. ; documentation described in the WDDJ V5N1 "Undocumented WinHelp Macros"      *
  272. ; article by Jim Mischel.                                                     *
  273. ;                                                                             *
  274. ; The following macros are supported :                                        *
  275. ;                                                                             *
  276. ; ExtAbleItem(menu_item, toggle) - Enable and Disable the menu_item, with     *
  277. ;                                  toggle 0 = Enable, toggle 1 = Disable.     *
  278. ;                                                                             *
  279. ; ExtInsertItem - Same as InsertItem, but with one additional parameter that  *
  280. ;                 allows you to set the menu state initially to enable or     *
  281. ;                 disable state. 0 = Enable, 1 = Disable                      *
  282. ;                 Notice that the 1st parameter in this macro allows you to   *
  283. ;                 set sub-menus in menus, a thing that can not be achieved    *
  284. ;                 with the documented winhelp macros.                         *
  285. ;                                                                             *
  286. ; Notice - The following undocumented menu and item identifiers can be used : *
  287. ;          mnu_helpontopn and mnu_helpon for the starndard winhelp menu items *
  288. ;          mnu_main for the winhelp standard menubar.                         *
  289. ;          mnu_floating is the undocumented floating menu                     *
  290. ;                                                                             *
  291. ;                                                                             *
  292. ; FloatingMenu - Call the floating menu, that has been created with the       *
  293. ;                routines and the mnu_floating undocumented menu id.          *
  294. ;                                                                             *
  295. ;                                                                             *
  296. ; ResetMenu - Restore's the winhelp standard menu.                            *
  297. ;                                                                             *
  298. ; JumpHash, PopupHash - Jump according to the internal hash id.               *
  299. ;                                                                             *
  300. ;******************************************************************************
  301.  
  302. .userlink $extAbleIte 'ExtAbleItem("%1",%2)'
  303. .userlink !extAbleIte '{\uldb %t}{\v !ExtAbleItem("%1",%2)}'
  304.  
  305. .userlink $extInsertItem 'InsertItem("%1","%2","%3","%4",%5,%6)'
  306. .userlink !extInsertItem '{\uldb %t}{\v !InsertItem("%1","%2","%3","%4",%5,%6)}'
  307.  
  308. .userlink $floatingMenu 'FloatingMenu()'
  309. .userlink !floatingMenu '{\uldb %t}{\v !FloatingMenu()}'
  310.  
  311. .userlink $resetMenu 'ResetMenu()'
  312. .userlink !resetMenu '{\uldb %t}{\v !ResetMenu()}
  313.  
  314. .userlink $jumpHash 'JumpHash(%1)'
  315. .userlink !jumpHash '{\uldb %t}{\v !JumpHash(%1)}'
  316.  
  317. .userlink $PopupHash 'PopupHash(%1)'
  318. .userlink !PopupHash '{\uldb %t}{\v !PopupHash(%1)}'
  319.  
  320. .endif
  321.  
  322. ;******************************************************************************
  323. ;                                 MultiMedia                                  *
  324. ;                                                                             *
  325. ; The following set of userlinks, and external routine reference, provide     *
  326. ; access to Video, CDAudio, MCI string interface, and other FUN stuff.        *
  327. ;                                                                             *
  328. ;                                                                             *
  329. ;******************************************************************************
  330.  
  331. .ifndef document
  332.  
  333. ;******************************************************************************
  334. ;                                mciSendString                                *
  335. ;                                                                             *
  336. ; this is the interface to the multimedia send string interface.              *
  337. ;                                                                             *
  338. ; Video : (AVI files, must have VfW drivers installed to use)                 *
  339. ;                                                                             *
  340. ; videoLink used in links, parameter 1 is the path to the AVI file.           *
  341. ;           Notice that the AVI file has to be in the "current directory".    *
  342. ; videoOpen, videoPlay and videoClose are .ACTION strings of topics, in       *
  343. ;            HLPDK V11.0 or later (not V10.0), and must appear in that order. *
  344. ;                                                                             *
  345. ; CDAudio : (RED Book CD Audio)                                               *
  346. ;                                                                             *
  347. ; CDAudioLink , parameter 1 is the start track to play from, parameter 2 -    *
  348. ;               the track to play to ..                                       *
  349. ;                                                                             *
  350. ; Generic MCI String command interface :                                      *
  351. ;                                                                             *
  352. ; mciStringLink - Parameter 1 is the MCI String to send.                      *
  353. ; mciStringAct  - Used for .ACTION topic attributes in HLPDK V11.0 or later.  *
  354. ;******************************************************************************
  355. .routine mciSendString MMSYSTEM SUuu
  356.  
  357. .userlink videoLink '{\uldb %t}{\v !mciSendString("play %1",0,0,0)}'
  358. .userlink videoOpen 'mciSendString("open AVIVideo!%1 alias vid",0,0,0)'
  359. .userlink videoPlay 'mciSendString("play vid wait",0,0,0)'
  360. .userlink videoClose 'mciSendString("close vid",0,0,0)'
  361.  
  362. .userlink CDAudioLink '{\uldb %t}{\v !mciSendString("open CDAudio",0,0,0)}{\v !mciSendString("play CDAudio from %1 to %2 wait",0,0,0)}{\v !mciSendString("close CDAudio",0,0,0)}'
  363.  
  364. .userlink mciStringLink '{\uldb %t}{\v !mciSendString("%1",0,0,0)}'
  365. .userlink mciStringAct  'mciSendString("%1",0,0,0)}'
  366.  
  367. .endif
  368.  
  369. .endif
  370.  
  371.  
  372.